OPTEE_TOOLCHAIN = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
OPTEE_COMPILER = "${@bb.utils.contains("BBFILE_COLLECTIONS", "clang-layer", "${OPTEE_TOOLCHAIN}", "gcc", d)}"

# Set here but not passed to EXTRA_OEMAKE by default as that breaks
# the optee-os build
OPTEE_ARCH = "arm64"
TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"

SRC_URI = "git://gitee.com/phytium_embedded/phytium-optee.git;protocol=https;nobranch=1"
SRCREV = "100060dd4bda6caf9230b277886bd19f796e6881"

EXTRA_OEMAKE += "V=1 \
                   LIBGCC_LOCATE_CFLAGS='${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \
                   COMPILER=${OPTEE_COMPILER} \
                   OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${prefix} \
                   TEEC_EXPORT=${STAGING_DIR_HOST}${prefix} \
                  "
export OPENSSL_MODULES="${STAGING_LIBDIR_NATIVE}/ossl-modules"
